<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>CRUD</title>
    <style>
        .body {
            /* display: flex; */
            text-align: center;
        }
        table {
            width: 100%;
            border-collapse: collapse;
        }
        th,td {
            border: 1px solid black;
            text-align: center;
        }
        th {
            background-color: #ddd;
        }
        .newRow {
            text-align: center;
        }

    </style>
</head>
<body>
    <div class="body">
        <h1> 表格的增删改查</h1>
        <hr>
    </div>
    <button onclick="addRow()">新增数据</button>
    <!-- <div id="table"> -->
    <table id="table">
        <tr>
            <th>姓名</th>
            <th>性别</th>
            <th>联系电话</th>
            <th>操作</th>
        </tr>
        <tr>
            <td>AAA</td>
            <td>man</td>
            <td>155xxxxxxx</td> 
            <td>
                <button onclick="editRow(this)">编辑</button>
                <button onclick="delectRow(this)">删除</button>
            </td>
        </tr>
    </table>
    <!-- </div> -->
    <br>
    <script src="CRUD.js"></script>
</body>

</html>